/*
DigitalFlipbook Source Code License Agreement
Copyright(c) 2008 DigitalFlipbook. All rights reserved.
	
Please read this Source Code License Agreement carefully before using
the source code.
	
DigitalFlipbook grants to you a perpetual, worldwide, non-exclusive,
no-charge, royalty-free, irrevocable copyright license, to reproduce,
prepare derivative works of, publicly display, publicly perform, and
distribute this source code and such derivative works in source or
object code form without any attribution requirements.
	
The name "DigitalFlipbook" must not be used to endorse or promote products
derived from the source code without prior written permission.
	
You agree to indemnify, hold harmless and defend DigitalFlipbook from and
against any loss, damage, claims or lawsuits, including attorney's
fees that arise or result from your use or distribution of the source
code.
	
THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT
ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF
NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL DIGITALFLIPBOOK
OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package com.digitalflipbook.webapis.scribd
{
	/**
	 * These are the common errors that can happen during
	 * a call to a Scribd method.
	 *
	 * http://www.scribd.com/platform/documentation/api
	 */
	public class ScribdError
	{
		/** Unauthorized */
		public static const UNAUTHORIZED:int = 401;
		
		/** Internal Server Error. Scribd has been notified about this problem */
		public static const INTERNAL_SERVER_ERROR:int = 500;

		/** Required parameter missing */
		public static const REQUIRED_PARAMETER_MISSING:int = 601;

		/** Unrecognized or blank file extension */
		public static const UNRECOGNIZED_OR_BLANK_FILE_EXTENSION:int = 602;

		/** No file data was sent */
		public static const NO_FILE_DATA_WAS_SENT:int = 603;

		/** Initial file saving failed */
		public static const INITIAL_FILE_SAVING_FAILED:int = 604;

		/** Saving document into scribd failed */
		public static const SAVING_DOCUMENT_INTO_SCRIBD_FAILED:int = 605;
		
		/** Problem downloading file */
		public static const PROBLEM_DOWNLOADING_FILE:int = 606;
		
		/** Problem saving settings */
		public static const PROBLEM_SAVING_SETTINGS:int = 607;
		
		/** Document not deletable */
		public static const DOCUMENT_NOT_DELETABLE:int = 608;
		
		/** Problem deleting document */
		public static const PROBLEM_DELETING_DOCUMENT:int = 609;
		
		/** Search is temporarily down */
		public static const SEARCH_IS_TEMPORARILY_DOWN:int = 610;

		/** Insufficient permissions to access this document */
		public static const INSUFFICIENT_PERMISSIONS_TO_ACCESS_THIS_DOCUMENT:int = 611;
		
		/** Document could not be found */
		public static const DOCUMENT_COULD_NOT_BE_FOUND:int = 612;
		
		/** Login failed */
		public static const LOGIN_FAILED:int = 613;
		
		/** Username already taken */
		public static const USERNAME_ALREADY_TAKEN:int = 615;
		
		/** User with that email address already exists */
		public static const USER_WITH_THAT_EMAIL_ADDRESS_ALREADY_EXISTS:int = 616;
		
		/** Invalid parameter value */
		public static const INVALID_PARAMETER_VALUE:int = 650;
		
		private var _errorCode:int;
		private var _errorMessage:String;
		
		/**
		 * Constructs a new ScribdError instance
		 * @langversion ActionScript 3.0
		 * @playerversion Flash 9.0
		 * @tiptext
		 */
		public function ScribdError()
		{
			// do nothing	
		}
		
		/**
		 * The error code returned from Scribd
		 *
		 * @langversion ActionScript 3.0
		 * @playerversion Flash 9.0
		 * @tiptext
		 */
		public function get errorCode():int
		{
			return _errorCode;	
		}
		
		public function set errorCode( value:int ):void
		{
			_errorCode = value;	
		}
		
		/**
		 * The error message returned from Scribd
		 *
		 * @langversion ActionScript 3.0
		 * @playerversion Flash 9.0
		 * @tiptext
		 */
		public function get errorMessage():String
		{
			return _errorMessage;	
		}
		
		public function set errorMessage( value:String ):void
		{
			_errorMessage = value;	
		}
		
	}	
	
}
